Compression of digital speech and audio signals is well known. Compression is generally required to efficiently transmit signals over a communications channel, or to store said compressed signals on a digital media device, such as a solid-state memory device or computer hard disk. Although there exist many compression (or “coding”) techniques, one method that has remained very popular for digital speech coding is known as Code Excited Linear Prediction (CELP), which is one of a family of “analysis-by-synthesis” coding algorithms. Analysis-by-synthesis generally refers to a coding process by which multiple parameters of a digital model are used to synthesize a set of candidate signals that are compared to an input signal and analyzed for distortion. A set of parameters that yield the lowest distortion is then either transmitted or stored, and eventually used to reconstruct an estimate of the original input signal. CELP is a particular analysis-by-synthesis method that uses one or more codebooks that each essentially comprises sets of code-vectors that are retrieved from the codebook in response to a codebook index.
For example, FIG. 1 is a block diagram of a CELP encoder 100 of the prior art. In CELP encoder 100, an input signal s(n) is applied to a Linear Predictive Coding (LPC) analysis block 101, where linear predictive coding is used to estimate a short-term spectral envelope. The resulting spectral parameters (or LP parameters) are denoted by the transfer function A(z). The spectral parameters are applied to an LPC Quantization block 102 that quantizes the spectral parameters to produce quantized spectral parameters Aq that are suitable for use in a multiplexer 108. The quantized spectral parameters Aq are then conveyed to multiplexer 108, and the multiplexer produces a coded bitstream based on the quantized spectral parameters and a set of codebook-related parameters τ, β, k, and γ, that are determined by a squared error minimization/parameter quantization block 107.
The quantized spectral, or LP, parameters are also conveyed locally to an LPC synthesis filter 105 that has a corresponding transfer function 1/Aq(z). LPC synthesis filter 105 also receives a combined excitation signal u(n) from a first combiner 110 and produces an estimate of the input signal ś(n) based on the quantized spectral parameters Aq and the combined excitation signal u(n). Combined excitation signal u(n) is produced as follows. An adaptive codebook code-vector cτ is selected from an adaptive codebook (ACB) 103 based on an index parameter τ. The adaptive codebook code-vector cτ is then weighted based on a gain parameter β and the weighted adaptive codebook code-vector is conveyed to first combiner 110. A fixed codebook code-vector ck is selected from a fixed codebook (FCB) 104 based on an index parameter k. The fixed codebook code-vector ck is then weighted based on a gain parameter γ and is also conveyed to first combiner 110. First combiner 110 then produces combined excitation signal u(n) by combining the weighted version of adaptive codebook code-vector cτ with the weighted version of fixed codebook code-vector ck.
LPC synthesis filter 105 conveys the input signal estimate ś(n) to a second combiner 112. Second combiner 112 also receives input signal s(n) and subtracts the estimate of the input signal ś(n) from the input signal s(n). The difference between input signal s(n) and input signal estimate ś(n) is applied to a perceptual error weighting filter 106, which filter produces a perceptually weighted error signal e(n) based on the difference between ś(n) and s(n) and a weighting function W(z). Perceptually weighted error signal e(n) is then conveyed to squared error minimization/parameter quantization block 107. Squared error minimization/parameter quantization block 107 uses the error signal e(n) to determine an optimal set of codebook-related parameters τ, β, k, and γ that produce the best estimate ś(n) of the input signal s(n).
FIG. 2 is a block diagram of a decoder 200 of the prior art that corresponds to encoder 100. As one of ordinary skilled in the art realizes, the coded bitstream produced by encoder 100 is used by a demultiplexer in decoder 200 to decode the optimal set of codebook-related parameters, that is, τ, β, k, and γ, in a process that is identical to the synthesis process performed by encoder 100. Thus, if the coded bitstream produced by encoder 100 is received by decoder 200 without errors, the speech ś(n) output by decoder 200 can be reconstructed as an exact duplicate of the input speech estimate ś(n) produced by encoder 100.
While CELP encoder 100 is conceptually useful, it is not a practical implementation of an encoder where it is desirable to keep computational complexity as low as possible. As a result, FIG. 3 is a block diagram of an exemplary encoder 300 of the prior art that utilizes an equivalent, and yet more practical, system to the encoding system illustrated by encoder 100. To better understand the relationship between encoder 100 and encoder 300, it is beneficial to look at the mathematical derivation of encoder 300 from encoder 100. For convenience of the reader, the variables are given in terms of their z-transforms.
From FIG. 1, it can be seen that perceptual error weighting filter 106 produces the weighted error signal e(n) based on a difference between the input signal and the estimated input signal, that is:E(z)=W(z)(S(z)−Ś(z)).  (1)From this expression, the weighting function W(z) can be distributed and the input signal estimate ś(n) can be decomposed into the filtered sum of the weighted codebook code-vectors:
                              E          ⁡                      (            z            )                          =                                            W              ⁡                              (                z                )                                      ⁢                          S              ⁡                              (                z                )                                              -                                                    W                ⁡                                  (                  z                  )                                                                              A                  q                                ⁡                                  (                  z                  )                                                      ⁢                                          (                                                      β                    ⁢                                                                                  ⁢                                                                  C                        τ                                            ⁡                                              (                        z                        )                                                                              +                                      γ                    ⁢                                                                                  ⁢                                                                  C                        k                                            ⁡                                              (                        z                        )                                                                                            )                            .                                                          (        2        )            The term W(z)S(z) corresponds to a weighted version of the input signal. By letting the weighted input signal W(z)S(z) be defined as Sw(z)=W(z)S(z) and by further letting weighted synthesis filter 105 of encoder 100 now be defined by a transfer function H(z)=W(z)/Aq(z), Equation 2 can rewritten as follows:E(z)=Sw(z)−H(z)(βCτ(z)+γCk(z)).  (3)By using z-transform notation, filter states need not be explicitly defined. Now proceeding using vector notation, where the vector length L is a length of a current subframe, Equation 3 can be rewritten as follows by using the superposition principle:e=sw−H(βcτ+γck)−hzir,  (4)where:                H is the L×L zero-state weighted synthesis convolution matrix formed from an impulse response of a weighted synthesis filter h(n), such as synthesis filters 303 and 304, and corresponding to a transfer function Hzs(z) or H(z), which matrix can be represented as:        
                              H          =                      [                                                                                h                    ⁡                                          (                      0                      )                                                                                        0                                                  ⋯                                                  0                                                                                                  h                    ⁡                                          (                      1                      )                                                                                                            h                    ⁡                                          (                      0                      )                                                                                        ⋯                                                  0                                                                              ⋮                                                  ⋮                                                  ⋰                                                  ⋮                                                                                                  h                    ⁡                                          (                                              L                        -                        1                                            )                                                                                                            h                    ⁡                                          (                                              L                        -                        2                                            )                                                                                        ⋯                                                                      h                    ⁡                                          (                      0                      )                                                                                            ]                          ,                            (        5        )                            hzir is a L×1 zero-input response of H(z) that is due to a state from a previous input,        sw is the L×1 perceptually weighted input signal,        β is the scalar adaptive codebook (ACB) gain,        cτ is the L×1 ACB code-vector in response to index τ,        γ is the scalar fixed codebook (FCB) gain, and        Ck the L×1 FCB code-vector in response to index k.By distributing H, and letting the input target vector xw=sw−hzir, the following expression can be obtained:e=xw−βHcτ−γHck.  (6)Equation 6 represents the perceptually weighted error (or distortion) vector e(n) produced by a third combiner 307 of encoder 300 and coupled by combiner 307 to a squared error minimization/parameter block 308.        
From the expression above, a formula can be derived for minimization of a weighted version of the perceptually weighted error, that is, ∥e∥2, by squared error minimization/parameter block 308. A norm of the squared error is given as:ε=∥e∥2=∥xw−βHcτ−γHck∥2.  (7)Due to complexity limitations, practical implementations of speech coding systems typically minimize the squared error in a sequential fashion. That is, the ACB component is optimized first (by assuming the FCB contribution is zero), and then the FCB component is optimized using the given (previously optimized) ACB component. The ACB/FCB gains, that is, codebook-related parameters β and γ, may or may not be re-optimized, that is, quantized, given the sequentially selected ACB/FCB code-vectors cτ and ck.
The theory for performing the sequential search is as follows. First, the norm of the squared error as provided in Equation 7 is modified by setting γ=0, and then expanded to produce:ε=∥xw−βHcτ∥2=xwTxw−2βxwTHcτ+β2cτTHTHcτ.  (8)Minimization of the squared error is then determined by taking the partial derivative of ε with respect to β and setting the quantity to zero:
                                          ∂            ɛ                                ∂            β                          =                                                            x                w                T                            ⁢                              Hc                τ                                      -                          β              ⁢                                                          ⁢                              c                τ                T                            ⁢                              H                T                            ⁢                              Hc                τ                                              =          0.                                    (        9        )            This yields an (sequentially) optimal ACB gain:
                    β        =                                                            x                w                T                            ⁢                              Hc                τ                                                                    c                τ                T                            ⁢                              H                T                            ⁢                              Hc                τ                                              .                                    (        10        )            Substituting the optimal ACB gain back into Equation 8 gives:
                                          τ            *                    =                                          ⁢                                                                      arg                  ⁢                  m                                ⁢                                                                  ⁢                in                            τ                        ⁢                          {                                                                    x                    w                    T                                    ⁢                                      x                    w                                                  -                                                                            (                                                                        x                          w                          T                                                ⁢                                                  Hc                          τ                                                                    )                                        2                                                                              c                      τ                      T                                        ⁢                                          H                      T                                        ⁢                                          Hc                      τ                                                                                  }                                      ,                            (        11        )            where τ* is a sequentially determined optimal ACB index parameter, that is, an ACB index parameter that minimizes the bracketed expression. Since xw is not dependent on τ, Equation 11 can be rewritten as follows:
                              τ          *                =                                            arg              ⁢              max                        τ                    ⁢                                    {                                                                    (                                                                  x                        w                        T                                            ⁢                                              Hc                        τ                                                              )                                    2                                                                      c                    τ                    T                                    ⁢                                      H                    T                                    ⁢                                      Hc                    τ                                                              }                        .                                              (        12        )            Now, by letting yτ equal the ACB code-vector cτ filtered by weighted synthesis filter 303, that is, yτ=Hcτ, Equation 13 can be simplified to:
                                          τ            *                    =                                                    arg                ⁢                max                            τ                        ⁢                          {                                                                    (                                                                  x                        w                        T                                            ⁢                                              y                        τ                                                              )                                    2                                                                      y                    τ                    T                                    ⁢                                      y                    τ                                                              }                                      ,                            (        13        )            and likewise, Equation 10 can be simplified to:
                    β        =                                                            x                w                T                            ⁢                              y                τ                                                                    y                τ                T                            ⁢                              y                τ                                              .                                    (        14        )            
Thus Equations 13 and 14 represent the two expressions necessary to determine the optimal ACB index τ and ACB gain β in a sequential manner. These expressions can now be used to determine the sequentially optimal FCB index and gain expressions. First, from FIG. 3, it can be seen that a second combiner 306 produces a vector x2, where x2=xw−βHcτ. The vector xw is produced by a first combiner 305 that subtracts a past excitation signal u(n-L), after filtering by a weighted synthesis filter 301, from an output sw(n) of a perceptual error weighting filter 302. The term βHcτ is a filtered and weighted version of ACB code-vector cτ, that is, ACB code-vector cτ filtered by weighted synthesis filter 303 and then weighted based on ACB gain parameter β. Substituting the expression X2=xw−βHcτ into Equation 7 yields:ε=∥x2−γHck∥2.  (15)where γHck is a filtered and weighted version of FCB code-vector ck, that is, FCB code-vector ck filtered by weighted synthesis filter 304 and then weighted based on FCB gain parameter γ. Similar to the above derivation of the optimal ACB index parameter τ*, it is apparent that:
                                          k            *                    =                                                    arg                ⁢                max                            τ                        ⁢                          {                                                                    (                                                                  x                        2                        T                                            ⁢                                              Hc                        k                                                              )                                    2                                                                      c                    k                    T                                    ⁢                                      H                    T                                    ⁢                                      Hc                    k                                                              }                                      ,                            (        16        )            where k* is a sequentially optimal FCB index parameter, that is, an FCB index parameter that maximizes the bracketed expression. By grouping terms that are not dependent on k, that is, by letting d2T=x2TH and Φ=HTH, Equation 16 can be simplified to:
                                          k            *                    =                                                    arg                ⁢                max                            τ                        ⁢                          {                                                                    (                                                                  d                        2                        T                                            ⁢                                              c                        k                                                              )                                    2                                                                      c                    k                    T                                    ⁢                  Φ                  ⁢                                                                          ⁢                                      c                    k                                                              }                                      ,                            (        17        )            in which the sequentially optimal FCB gain γ is given as:
                    γ        =                                                            d                2                T                            ⁢                              c                k                                                                    c                k                T                            ⁢              Φ              ⁢                                                          ⁢                              c                k                                              .                                    (        18        )            
Thus, encoder 300 provides a method and apparatus for determining the optimal excitation vector-related parameters τ, β, k, and γ, in a sequential manner. However, the sequential determination of parameters τ, β, k, and γ is actually sub-optimal since the optimization equations do not consider the effects that the selection of one codebook code-vector has on the selection of the other codebook code-vector.
In order to better optimize the codebook-related parameters τ, β, k, and γ, a paper entitled “Improvements to the Analysis-by Synthesis Loop in CELP Codecs,” by Woodward, J. P. and Hanzo, L., published by the IEEE Conference on Radio Receivers and Associated Systems, dated Sep. 26–28, 1995, pages 114–118 (hereinafter referred to as the “Woodward and Hanzo paper”), discusses several joint search procedures. One discussed joint search procedure involves an exhaustive search of both the ACB and the FCB. However, as noted in the paper, such a joint search process involves nearly 60 times the complexity of a sequential search process. Other joint search processes discussed in the paper that yield a result nearly as good as the exhaustive search of both the ACB and the FCB involve complexity increases of 30 to 40 percent over the sequential search process. However, even a 30 to 40 percent increase in complexity can present an undesirable load to a processor when the processor is being asked to run ever increasing numbers of applications, placing processor load at a premium.
Therefore, there exists a need for a method and apparatus for determine the analysis-by-synthesis codebook-related parameters τ, β, k, and γ, in a more efficient manner, which method an apparatus do not involve the complexity of the joint search processes of the prior art.